<div class="ItemsWarp clearfix">
<h2 class="offScreen">商品列表</h2>
    <{assign var='zindex' value='1000'}>
	<ul class="horizontal-m">
    <{foreach from=$products item="product"}>
    <li class="items-list <{$mask_webslice}> itemsList  clearfix" product="<{$product.goods_id}>" id="pdt-<{$product.goods_id}>">
		<div class="goodpic" style="<{if $image_set.S.width}> width:<{$image_set.S.width}>px;position:relative;<{/if}>">

			      <{if $product.tags}>
			      <{foreach from=$product.tags item=tags}>
			        <{assign var="tagImage" value=$tags.params.tag_image}>
			        <{if $tagImage}>
                    <div style="margin: 0pt auto;">
			        <div class="GoodsTip" style="filter:alpha(opacity=<{$tags.params.tag_opacity}>);position:absolute">
			            <img src="<{$tagImage|storager:'s'}>" style="opacity:<{$tags.params.tag_opacity/100}>;filter:alpha(opacity=<{$tags.params.tag_opacity}>);" pos = "<{$tags.params.pic_loc}>"/>
			        </div>
                    </div>
                    <{/if}>
			      <{/foreach}>
			      <{/if}>
                    <{if $product.udfimg == 'true'}>
                    <{assign var="gimage" value=$product.thumbnail_pic}>
                    <{else}>
                    <{assign var="gimage" value=$product.image_default_id|default:$defaultImage}>
                    <{/if}>
                    <a target="_blank" style='<{if $image_set.S.width}> width:<{$image_set.S.width}>px;height:<{$image_set.S.height}>px;<{/if}>' href="<{link app=b2c ctl=site_product act=index arg=$product.goods_id}>">
                      <{img src="transparent.gif" app="b2c" lazyload=$gimage|storager:'s' class="img-lazyload"  alt=$product.name|escape:html}>
                        <{*<span class='zoom-handle' pic='<{$product.big_pic|default:$env.conf.site.default_big_pic|storager}>'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>*}>
                    </a>

		</div>
        <div class="goods-main clearfix">
           <div class="goodinfo">
                        <h6>
                        <a href="<{link app=b2c ctl=site_product act=index arg=$product.goods_id}>" title="<{$product.name|escape:html}>" class="entry-title" target="_blank"><{$product.name|escape:"html"}></a>
			            <{if $product.tags}>
			                <{foreach from=$product.tags item=tags}>
			                <{if $tags.params.tag_showOnIndex}>
			                &nbsp;<span style="color:<{$tags.tag_bgcolor}>"><{$tags.tag_name}></span>
			                <{/if}>
			                <{/foreach}>
			            <{/if}>
                    </h6>
                    <p><{$product.brief}>

                    <{if $site.props}>
                    <div class="standard">
                       <p><{t}>品牌：<{/t}><span>KUKU</span><{t}>风格：<{/t}><span><{t}>夏季<{/t}></span></p>
                        <p><th><{t}>质地：<{/t}><span><{t}>纯棉<{/t}></span><{t}>款式：<{/t}><span><{t}>双排扣<{/t}></span></p>
                    </div>
                    <{/if}></p>
			</div>
			<div class="price-wrap ">
					<p class="pricelist clearfix">
                        <{t}>现价：<{/t}><span class="font-red font14px fontbold"><{$product.price|cur_odr}></span>
                        <{if $product.timebuyprice}><br/><{t}>抢购价：<{/t}><span class="font-red font14px fontbold"><{$product.timebuyprice|cur_odr}></span><{/if}>
                        <br/><{if $product.mktprice && $setting.mktprice eq true}><{t}>原价：<{/t}><del><{$product.mktprice|cur_odr}></del><{/if}>
                        <{if $product.mktprice > $product.price && $setting.mktprice && $setting.saveprice > 0}>
                        <br/> <{if $setting.saveprice == 1}><{t}>节省：<{/t}><span ><{if $product.timebuyprice}><{$product.mktprice-$product.timebuyprice|cur_odr}><{else}><{$product.mktprice-$product.price|cur_odr}><{/if}>
                            <br/><{elseif $setting.saveprice == 2}><{t}>优惠:<{/t}><span><{if $product.timebuyprice}><{$product.timebuyprice/$product.mktprice*100|number:'2'}><{else}><{$product.price/$product.mktprice*100|number:'2'}><{/if}>%
                            <{elseif $setting.saveprice == 3}><{t}>折扣:<{/t}><span><{if $product.timebuyprice}><{$product.timebuyprice/$product.mktprice*10|number:'1'}><{else}><{$product.price/$product.mktprice*10|number:'1'}><{/if}><{t}>折<{/t}>
                            <{/if}></span>
                        <{/if}>
                        <!--<li class="intro rank-<{$product.rank|default:3}>">Rank <{$product.rank|default:3}></li>-->
                    </p>

                        <ul class="button clearboth" >
                        <{goodsmenu product=$product setting=$setting login=$login zindex=$zindex-- }>
                        <li >
                        <a href="javascript:void(0)" rel="_gcomp_" data-gcomp="{gid:'<{$product.goods_id}>',gname:'<{$product.name|addslashes|escape:html}>',gtype:'<{$product.type_id}>',url:'<{link app=b2c ctl=site_product act=index arg=$product.goods_id}>'}" class="btn-a"><i class="has-icon"> <img src='<{$env.app.res_url}>/bundle/contrast_icon.gif' /></i><span><{t}>对比<{/t}></span></a>

                        <!-- <a href="javascript:void(0)" onclick="gcompare.add({gid:'<{$product.goods_id}>',gname:'<{$product.name|addslashes|escape:html}>',gtype:'<{$product.type_id}>'});" class="btncmp" title="<{t}>商品对比<{/t}>">
                            <{t}>商品对比<{/t}>
                        </a>-->
                        </li>
                    </ul>
		</div>
        </div>

    </li>
    <{/foreach}>
	</ul>
</div>
<script>
    /*
    *商品标签定位
    */
 window.addEvent('domready',function(){
          var tips = $$('.GoodsTip');



            //var opacity = tips.getElement('img').get('op')[0];

        //tips.getElement('img').setStyle('opacity',opacity);

        if(tips.length>0){

    var parSize = {
        x : tips.getParent('.goodpic')[0].getSize().x,
        y : tips.getParent('.goodpic')[0].getSize().y
    };


    var GoodsTipPos= {
        tl:{left:0,top:0},
        tc:{left:(parSize.x)/2 - 25,top:0},
        tr:{top:0,right:0},
        ml:{left:0,top:(parSize.y)/2 - 25},
        mc:{left:(parSize.x)/2 - 25,top:(parSize.y)/2 -25},
        mr:{top:(parSize.y)/2 - 25,right:0},
        bl:{bottom:0,left:0},
        bc:{bottom:0,left:(parSize.x)/2 - 25},
        br:{bottom:0,right:0}
    };


    /*.setStyles({
        'top':Pos.top,
        'left':Pos.left,
        'right':Pos.right,
        'bottom':Pos.bottom
    });
    */
    tips.each(function(v){
        v.getElement('img').zoomImg(50,50);

        var ImgSrc = v.getElement('img').get('src');
        var ImgStr = "filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+ImgSrc+"')";

        if(Browser.ie6)
        v.getElement('img').setStyle('filter',ImgStr);

        var proPos = v.getElement('img').get('pos');

        var Pos = GoodsTipPos[proPos];
  //      if(Browser.ie6) {
   //     if(Pos.left === 0 && Pos.top===0)
   //         Pos.left -= v.getParent().getSize().x/2;
    //    };

        v.setStyles({
        'top':Pos.top,
        'left':Pos.left,
        'right':Pos.right,
        'bottom':Pos.bottom
    });
    //if(Browser.ie6) {
   //      if(Pos.left === 0 && Pos.top===0)
    //    Pos.left += v.getParent().getSize().x/2
    //};
    });
    }
    });


</script>


